Optimal. Leaf size=96 \[ \frac {c^2 x}{a^3}-\frac {4 c^2 \tan (e+f x)}{5 a^3 f (1+\sec (e+f x))^3}-\frac {8 c^2 \tan (e+f x)}{15 a^3 f (1+\sec (e+f x))^2}-\frac {23 c^2 \tan (e+f x)}{15 a^3 f (1+\sec (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.22, antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 7, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {3988, 3862,
4007, 4004, 3879, 3881, 3882} \begin {gather*} -\frac {23 c^2 \tan (e+f x)}{15 a^3 f (\sec (e+f x)+1)}-\frac {8 c^2 \tan (e+f x)}{15 a^3 f (\sec (e+f x)+1)^2}-\frac {4 c^2 \tan (e+f x)}{5 a^3 f (\sec (e+f x)+1)^3}+\frac {c^2 x}{a^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3862
Rule 3879
Rule 3881
Rule 3882
Rule 3988
Rule 4004
Rule 4007
Rubi steps
\begin {align*} \int \frac {(c-c \sec (e+f x))^2}{(a+a \sec (e+f x))^3} \, dx &=\frac {\int \left (\frac {c^2}{(1+\sec (e+f x))^3}-\frac {2 c^2 \sec (e+f x)}{(1+\sec (e+f x))^3}+\frac {c^2 \sec ^2(e+f x)}{(1+\sec (e+f x))^3}\right ) \, dx}{a^3}\\ &=\frac {c^2 \int \frac {1}{(1+\sec (e+f x))^3} \, dx}{a^3}+\frac {c^2 \int \frac {\sec ^2(e+f x)}{(1+\sec (e+f x))^3} \, dx}{a^3}-\frac {\left (2 c^2\right ) \int \frac {\sec (e+f x)}{(1+\sec (e+f x))^3} \, dx}{a^3}\\ &=-\frac {4 c^2 \tan (e+f x)}{5 a^3 f (1+\sec (e+f x))^3}-\frac {c^2 \int \frac {-5+2 \sec (e+f x)}{(1+\sec (e+f x))^2} \, dx}{5 a^3}+\frac {\left (3 c^2\right ) \int \frac {\sec (e+f x)}{(1+\sec (e+f x))^2} \, dx}{5 a^3}-\frac {\left (4 c^2\right ) \int \frac {\sec (e+f x)}{(1+\sec (e+f x))^2} \, dx}{5 a^3}\\ &=-\frac {4 c^2 \tan (e+f x)}{5 a^3 f (1+\sec (e+f x))^3}-\frac {8 c^2 \tan (e+f x)}{15 a^3 f (1+\sec (e+f x))^2}+\frac {c^2 \int \frac {15-7 \sec (e+f x)}{1+\sec (e+f x)} \, dx}{15 a^3}+\frac {c^2 \int \frac {\sec (e+f x)}{1+\sec (e+f x)} \, dx}{5 a^3}-\frac {\left (4 c^2\right ) \int \frac {\sec (e+f x)}{1+\sec (e+f x)} \, dx}{15 a^3}\\ &=\frac {c^2 x}{a^3}-\frac {4 c^2 \tan (e+f x)}{5 a^3 f (1+\sec (e+f x))^3}-\frac {8 c^2 \tan (e+f x)}{15 a^3 f (1+\sec (e+f x))^2}-\frac {c^2 \tan (e+f x)}{15 a^3 f (1+\sec (e+f x))}-\frac {\left (22 c^2\right ) \int \frac {\sec (e+f x)}{1+\sec (e+f x)} \, dx}{15 a^3}\\ &=\frac {c^2 x}{a^3}-\frac {4 c^2 \tan (e+f x)}{5 a^3 f (1+\sec (e+f x))^3}-\frac {8 c^2 \tan (e+f x)}{15 a^3 f (1+\sec (e+f x))^2}-\frac {23 c^2 \tan (e+f x)}{15 a^3 f (1+\sec (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.52, size = 171, normalized size = 1.78 \begin {gather*} \frac {c^2 \sec \left (\frac {e}{2}\right ) \sec ^5\left (\frac {1}{2} (e+f x)\right ) \left (150 f x \cos \left (\frac {f x}{2}\right )+150 f x \cos \left (e+\frac {f x}{2}\right )+75 f x \cos \left (e+\frac {3 f x}{2}\right )+75 f x \cos \left (2 e+\frac {3 f x}{2}\right )+15 f x \cos \left (2 e+\frac {5 f x}{2}\right )+15 f x \cos \left (3 e+\frac {5 f x}{2}\right )-500 \sin \left (\frac {f x}{2}\right )+360 \sin \left (e+\frac {f x}{2}\right )-280 \sin \left (e+\frac {3 f x}{2}\right )+150 \sin \left (2 e+\frac {3 f x}{2}\right )-86 \sin \left (2 e+\frac {5 f x}{2}\right )\right )}{480 a^3 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.14, size = 61, normalized size = 0.64
method | result | size |
derivativedivides | \(\frac {c^{2} \left (-\frac {\left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{5}+\frac {2 \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3}-2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )\right )}{f \,a^{3}}\) | \(61\) |
default | \(\frac {c^{2} \left (-\frac {\left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{5}+\frac {2 \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3}-2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )\right )}{f \,a^{3}}\) | \(61\) |
risch | \(\frac {c^{2} x}{a^{3}}-\frac {2 i c^{2} \left (75 \,{\mathrm e}^{4 i \left (f x +e \right )}+180 \,{\mathrm e}^{3 i \left (f x +e \right )}+250 \,{\mathrm e}^{2 i \left (f x +e \right )}+140 \,{\mathrm e}^{i \left (f x +e \right )}+43\right )}{15 f \,a^{3} \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{5}}\) | \(81\) |
norman | \(\frac {\frac {c^{2} x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}-\frac {c^{2} x}{a}+\frac {2 c^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}-\frac {8 c^{2} \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 a f}+\frac {13 c^{2} \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{15 a f}-\frac {c^{2} \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{5 a f}}{\left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) a^{2}}\) | \(135\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 229 vs.
\(2 (96) = 192\).
time = 0.50, size = 229, normalized size = 2.39 \begin {gather*} -\frac {c^{2} {\left (\frac {\frac {105 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {20 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}}{a^{3}} - \frac {120 \, \arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a^{3}}\right )} + \frac {2 \, c^{2} {\left (\frac {15 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {10 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}\right )}}{a^{3}} - \frac {3 \, c^{2} {\left (\frac {5 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}\right )}}{a^{3}}}{60 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.57, size = 147, normalized size = 1.53 \begin {gather*} \frac {15 \, c^{2} f x \cos \left (f x + e\right )^{3} + 45 \, c^{2} f x \cos \left (f x + e\right )^{2} + 45 \, c^{2} f x \cos \left (f x + e\right ) + 15 \, c^{2} f x - {\left (43 \, c^{2} \cos \left (f x + e\right )^{2} + 54 \, c^{2} \cos \left (f x + e\right ) + 23 \, c^{2}\right )} \sin \left (f x + e\right )}{15 \, {\left (a^{3} f \cos \left (f x + e\right )^{3} + 3 \, a^{3} f \cos \left (f x + e\right )^{2} + 3 \, a^{3} f \cos \left (f x + e\right ) + a^{3} f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {c^{2} \left (\int \left (- \frac {2 \sec {\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\right )\, dx + \int \frac {\sec ^{2}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {1}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx\right )}{a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.52, size = 80, normalized size = 0.83 \begin {gather*} \frac {\frac {15 \, {\left (f x + e\right )} c^{2}}{a^{3}} - \frac {3 \, a^{12} c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 10 \, a^{12} c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 30 \, a^{12} c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{a^{15}}}{15 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.40, size = 93, normalized size = 0.97 \begin {gather*} \frac {c^2\,x}{a^3}-\frac {\frac {43\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,c^2\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4}{15}-\frac {16\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,c^2\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{15}+\frac {\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,c^2}{5}}{a^3\,f\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________